package cn.cau.epidemicsurveysystem.bean;

import javax.persistence.*;
import java.util.Objects;

/**
 * @projectName: gp2023
 * @package: cn.cau.epidemicsurveysystem.bean
 * @className: MonthStatisticsBean
 * @author: zy
 * @description: TODO
 * @date: 2022/3/3 16:52
 * @version: 1.0
 */
@Entity
@Table(name = "monthStatistics", schema = "gp2022", catalog = "")
public class MonthStatisticsBean {
    private int id;
    private Integer year;
    private Integer month;
    private Integer type;
    private Integer caseNumber;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "year")
    public Integer getYear() {
        return year;
    }

    public void setYear(Integer year) {
        this.year = year;
    }

    @Basic
    @Column(name = "month")
    public Integer getMonth() {
        return month;
    }

    public void setMonth(Integer month) {
        this.month = month;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "caseNumber")
    public Integer getCaseNumber() {
        return caseNumber;
    }

    public void setCaseNumber(Integer caseNumber) {
        this.caseNumber = caseNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        MonthStatisticsBean that = (MonthStatisticsBean) o;
        return id == that.id && Objects.equals(year, that.year) && Objects.equals(month, that.month) && Objects.equals(type, that.type) && Objects.equals(caseNumber, that.caseNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, year, month, type, caseNumber);
    }
}
